# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-testtools
pkgver=2.6.0
_commit=280f4272832861cf35aec27d3857669d1053e8a8
pkgrel=2
pkgdesc="Extensions to the Python standard library unit testing framework"
arch=('any')
license=('MIT')
url="https://github.com/testing-cabal/testtools"
depends=('python-pbr' 'python-fixtures')
makedepends=('git' 'python-setuptools')
checkdepends=('python-testscenarios')
source=("git+https://github.com/testing-cabal/testtools.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd testtools
  python setup.py build
}

check() {
  cd testtools
  python -m testtools.run testtools.tests.test_suite
}

package() {
  cd testtools
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
